Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identify tool #270

Merged
merged 30 commits into from
Jan 10, 2025
Merged

Identify tool #270

merged 30 commits into from
Jan 10, 2025

Conversation

gjmooney
Copy link
Collaborator

@gjmooney gjmooney commented Dec 24, 2024

First iteration of identify tool mentioned in #237

This only works for tiff and vector layers right now.

identify

You can also see the identified features of the user you are following now
collabfeature

@gjmooney gjmooney requested a review from mfisher87 December 24, 2024 16:01
Copy link
Contributor

Binder 👈 Launch a Binder on branch gjmooney/jupytergis/identify_tool

Copy link
Contributor

github-actions bot commented Dec 24, 2024

Integration tests report: appsharing.space

Copy link
Contributor

Preview using JupyterLite: appsharing.space

Copy link
Contributor

Docs preview: appsharing.space

@gjmooney gjmooney added the enhancement New feature or request label Dec 24, 2024
@mfisher87
Copy link
Member

Sick!!!

@gjmooney gjmooney force-pushed the identify_tool branch 3 times, most recently from abf2261 to 5247bef Compare January 8, 2025 13:54
@gjmooney gjmooney marked this pull request as ready for review January 8, 2025 13:54
@gjmooney gjmooney requested a review from martinRenou January 8, 2025 13:54
@mfisher87
Copy link
Member

mfisher87 commented Jan 8, 2025

@gjmooney ready for the WIP indicator be removed from the PR title?

@gjmooney gjmooney changed the title [WIP] Identify tool Identify tool Jan 8, 2025
Copy link
Member

@mfisher87 mfisher87 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me! I don't yet feel confident enough in the overall architecture to "approve" such a big change, so I'll just leave my comments :)

packages/base/src/commands.ts Show resolved Hide resolved
packages/base/src/mainview/mainView.tsx Show resolved Hide resolved
packages/base/src/mainview/mainView.tsx Show resolved Hide resolved
Comment on lines 231 to 248
fill: new Fill({
color: '#f37626'
})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks great! But I'm also wondering if we should more closely mirror the QGIS behavior which is to apply a heavy red stroke to identified features. Will Jupyter Orange more readily conflict with common colormaps? In QGreenland we chose a white-to-orange colormap for earthquakes, I don't really remember why, but for that colormap, Jupyter Orange would not stand out.

image

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I think the red QGIS uses is hideous, and hard to see. Any color we use for the highlight could potentially conflict with a colormap, ideally the highlight color should be user customizable (along with the width, hit tolerance, etc.). For now I made the color a little more red and added a border so hopefully they stand out a bit more.

highlightstroke

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree the color in QGIS is pretty ugly :) But since the effect in QGIS is a heavy stroke on the existing point, even if the color conflicts, the feature becomes visibly larger. We can always continue to tweak on user feedback; thanks for hearing me out!

packages/base/src/mainview/mainView.tsx Outdated Show resolved Hide resolved
packages/base/src/mainview/mainView.tsx Outdated Show resolved Hide resolved
label: '',
commands: options.commands
})
);
Copy link
Member

@mfisher87 mfisher87 Jan 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking aloud about the future, we could have more buttons here for "point identify", "polygon identify", "bbox identify", and "normal mode"?

@@ -390,21 +391,28 @@ export class JupyterGISModel implements IJupyterGISModel {
syncViewport(viewport?: IViewPortState, emitter?: string): void {
this.sharedModel.awareness.setLocalStateField('viewportState', {
value: viewport,
emitter: emitter
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's ban this style with a lint rule? :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤷 I'm fine with either way

@mfisher87
Copy link
Member

You can also see the identified features of the user you are following now

This is super slick!! 🤩

Copy link
Member

@martinRenou martinRenou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing! That looks neat 😄

As a follow-up, it may be nice to make the list of selected features on the right more interactive (highlight/pan-to feature on click etc). I will open an issue to track this.

@martinRenou
Copy link
Member

martinRenou commented Jan 10, 2025

please update snapshots!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be an actual issue with the PR?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the stroke for the default style for some reason? I'll just put it back.

Copy link
Member

@martinRenou martinRenou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@martinRenou martinRenou merged commit c2372d3 into geojupyter:main Jan 10, 2025
2 checks passed
@gjmooney gjmooney deleted the identify_tool branch January 10, 2025 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants